<?php
include_once "header.php";


?>

<div id="container">
	<div id="maincont">
		<?php include_once "menu_samping.php"; ?>
		<div id="mainright">
			<div id="title">
			Surat Masuk > Detil > Hapus Posisi
			</div>
			<div id="body">
			<br>	
			
			<?php
		
			if (isset ($_GET["id_pos"]) && isset ($_GET["kd_sm"])){
				$daftar_posisi_sm = new Daftar_posisi_surat();
				if($daftar_posisi_sm->deletePosSM($_GET["id_pos"])==true){
					header("Location:detil_sm.php?id=".$_GET["kd_sm"]."");
				} else {
					echo "Tidak dapat menghapus posisi surat.";
					echo "<br>";
					echo "<br>";
					echo "<input type=\"button\" value=\"Kembali\" onClick=\"window.location.href='detil_sm.php?id=".$_GET["kd_sm"]."'\">";
					}
				

			}
			
			?>
					
			</div>
        </div>
	</div>
</div>
<?php
	include_once "footer.php";
?>

<script type="text/javascript">
	function del(){
	if(confirm('Apakah Anda yakin akan menghapus surat ini?'))
	return true;
	else return false
	}
</script>
